package cn.gene.timeyan.pojo.ums.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

@Data
@ApiModel("勋章显示模块")
public class HonorVO implements Serializable{
    @ApiModelProperty(value = "徽章id")
    private Long honorId;
    @ApiModelProperty(value = "徽章名称")
    private String honorName;
    @ApiModelProperty(value = "徽章图标")
    private String iconUrl;
    @ApiModelProperty(value = "徽章获取方式")
    private String acquireWay;
    @ApiModelProperty(value = "是否拥有")
    private Character has;
    @ApiModelProperty(value = "徽章是否可获得")
    private Character available;
    @JsonFormat(pattern = "yy年MM月dd日",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yy年MM月dd日")
    @ApiModelProperty(value = "徽章获取截止时间")
    private LocalDateTime endTime;
    @JsonFormat(pattern = "yy年MM月dd日",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yy年MM月dd日")
    @ApiModelProperty(value = "徽章获取时间")
    private LocalDateTime gainTime;

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (!(obj instanceof HonorVO)) return false;
        HonorVO u= (HonorVO) obj;
        return Objects.equals(this.getHonorId(), u.honorId);
    }
}
